//class
class Coder{
    //类参数
    constructor(a,b){
        this.a = a;
        this.b = b;
    }

    name(val){
        console.log(val);
        return val;
    }

    skill(val){
        console.log(this.name(`技术胖:${val} skill-${val}`));
    }

    add(){
        return this.a + this.b;
    }

}

let jspang = new Coder;
jspang.name('技术胖');

jspang.skill('web');

//类参数使用
let jspang1 = new Coder(1,2);
console.log(jspang1.add());

//类的继承
class htmler extends Coder{

}

let pang = new htmler(2,3);
console.log(pang.add());